﻿using System;
using System.Diagnostics;

namespace Fuse8.DomainFramework.Common.Logging
{
    internal static class TraceListenerEx
    {
        public static void WriteLine(string message, string category)
        {
            Trace.WriteLine(string.Format("Stamp:{0}. Message:{1}", GetDateTimeStamp(), message), category);
        }

        private static string GetDateTimeStamp()
        {
            var currentDateTime = DateTime.Now;

            return string.Format("{0}.{1}", currentDateTime.ToString("yyyy.MM.dd hh:mm:ss"), currentDateTime.Millisecond);
        }
    }
}
